<?php



#API
Route::group(['prefix'=>'Api'], function() {

    #APP初始接口
    Route::get('/index_app', 'ApiController@IndexApp');                            //done
    #首页数据展示
    Route::get('/index_data', 'ApiController@IndexData');                          //done
    #注册
    Route::post('/register', 'ApiController@DeposeRegister');                      //done
    #注销登录
    Route::get('/logout', 'ApiController@Logout');                                 //done
    #登录
    Route::post('/login', 'ApiController@DeposeLogin');                            //done
    #忘记密码
    Route::post('/forget_password', 'ApiController@ForgetPassword');               //done
    #行情快讯
    Route::get('/market_information', 'ApiController@MarketInformation');          //done
    #商城数据
    Route::get('/shop_data', 'ApiController@ShopData');                          //done
    #钢厂列表
    Route::get('/factory_list', 'ApiController@FactoryList');                      //done
    #求购单
    Route::get('/request_list', 'ApiController@RequestList');                      //done
    #品类信息
    Route::get('/category_data', 'ApiController@CategoryData');                    //done
    #企业认证
    Route::post('/company_auth', 'ApiController@CompanyAuth');                     //done
    #行情快讯展示
    Route::get('/information_show', 'ApiController@InformationShow');              //done
    #修改登录密码
    Route::post('/up_login_pwd', 'ApiController@UploginPwd');                      //done
    #消息列表
    Route::get('/message_list', 'ApiController@MessageList');                      //done
    #最新消息
    Route::get('/new_message', 'ApiController@NewMessage');                        //done
    #城市列表
    Route::get('/city_list', 'ApiController@CityList');                            //done
    #获取token
    Route::get('/get_token', 'ApiController@GetToken');                            //done
    #获取个人信息
    Route::post('/get_user_information', 'ApiController@GetUserInformation');       //done
    #用户协议
    Route::get('/user_rule', 'ApiController@UserRule');         //done
    #热门搜索
    Route::get('/hot_search', 'ApiController@HotSearch');       //done
    #修改头像
    Route::get('/up_avatar', 'ApiController@UpAvatar');           //done
    #自动登录
    Route::post('/auto_login', 'ApiController@AutoLogin');


    #购物车列表
    Route::get('/cart_info', 'ApiController@CartInfo');                  //done
    #购物车添加商品
    Route::post('/add_cart', 'ApiController@AddCart');                  //done
    #购物车更新商品
    Route::post('/update_cart', 'ApiController@UpdateCart');            //done
    #购物车数据
    Route::post('/updateone', 'ApiController@UpdateCartone');            //done
    #购物车删除商品
    Route::post('/delete_cart', 'ApiController@DeleteCart');            //done
    #反馈意见
    Route::post('/feed_back', 'ApiController@FeedBack');            //done
    #订单
    Route::post('/add_order', 'ApiController@AddOrder');            //done
    #购物车全选删除
    Route::post('/check_cart', 'ApiController@CheckdeCart');            //done
    #添加订单
    Route::post('/add_order', 'ApiController@AddOrder');            //done
    #确认订单
    Route::post('/order_info', 'ApiController@OrderInfo');            //done
    #订单列表
    Route::post('/order_list', 'ApiController@APPOrderList');           //done
    #支付方式
    Route::get('/pay_ment', 'ApiController@Payment');           //done
    #删除订单
    Route::post('/delet_order', 'ApiController@APPDelOrder');          //done
    #取消订单
    Route::post('/cance_order', 'ApiController@APPCanceOrder');          //doneding
    #确认提货订单
    Route::post('/confim_order', 'ApiController@APPConfOrder');          //doneding
    #订单详情
    Route::post('/order_detail', 'ApiController@APPOrderDetail');          //doneding
    #添加发票
    Route::post('/invoice', 'ApiController@AddInvoice');          //doneding
    #京东支付
    Route::any('/project_jdpay', 'ApiController@JdPay');
    #支付
    Route::get('/pay_first', 'ApiController@PayFirst');          //done
    #未审核取消订单
    Route::post('/audit_order', 'ApiController@APPNotdted');          //doneding


    #异步通知
    Route::any('/notify_web', 'ApiController@Notify');          //
    #支付成功跳转
    Route::get('/success_url', 'ApiController@SuccessUrl');          //
    #支付失败跳转
    Route::get('/fail_url', 'ApiController@FailUrl');          //


    //————————————————————————————————————————————————————

});


Route::get('/captcha', 'AdminController@Captcha');                          //验证码

Route::group(['prefix'=>'admin'], function() {
    /**
     * 后台登录
     */
    Route::get('/', 'AdminController@Login');                                   //登录界面
    Route::post('/depose_login', 'AdminController@DisposeLogin');               //登录请求
    Route::post('/cache_cate', 'AdminController@CacheCate');                    //分类缓存

    Route::group(array('before' => 'admin'), function () {


        /**
         *广告位管理
         */
        Route::get('/ads_list', 'AdminController@AdsList');                           //广告列表
        Route::any('/add_ads', 'AdminController@AddAds');                             //广告位添加
        Route::any('/edit_ads', 'AdminController@EditAds');                           //广告位编辑
        Route::any('/del_ads', 'AdminController@DelAds');                             //广告位删除
        Route::any('/ads_ajax', 'AdminController@AdsAjax');                           //ajax返回


        /**
         *文章管理
         */
        Route::get('/article_show', 'AdminController@ArticleList');                     //文章列表
        Route::get('/article_add', 'AdminController@ArticleImport');                    //文章录入
        Route::any('/article_delete', 'AdminController@ArticleDelete');                 //文章删除
        Route::any('/article_service_ajax', 'AdminController@ArticleServiceAjax');      //文章ajax返回
        Route::any('/article_edit', 'AdminController@ArticleEdit');                     //文章编辑

        /**
         *管理员管理
         */
        Route::get('/manage_admin', 'AdminController@ManageAdmin');                 //管理员管理
        Route::get('/add_admin', 'AdminController@AddAdmin');                       //管理员添加
        Route::any('/edit_admin', 'AdminController@EditAdmin');                     //管理员编辑
        Route::any('/del_admin', 'AdminController@DeleteAdmin');                    //管理员删除
        Route::any('/admin_service_ajax', 'AdminController@AdminServiceAjax');      //管理员ajax

        /**
         *日志管理
         */
        Route::get('/log_service', 'AdminController@LogService');                    //日志
        Route::any('/del_log', 'AdminController@DeleteLog');                         //日志删除
        Route::any('/log_service_ajax', 'AdminController@LogServiceAjax');           //日志ajax


        /**
         *订单管理
         */
        Route::get('/order_list', 'AdminController@OrderList');                                  //订单列表
        Route::get('/down_order_list', 'AdminController@DownOrderList');                         //下单列表
        Route::get('/down_order_import', 'AdminController@DownOrderImport');                     //下单表单
        Route::POST('/down_order_import_action', 'AdminController@DownOrderImportAction');        //订单入库
        Route::get('/invoice', 'AdminController@Invoice');                                       //需开发票订单
        Route::get('/update_invoice', 'AdminController@UpdateInvoice');                           //完善发票信息
        Route::post('/update_invoice_action', 'AdminController@UpdateInvoiceAction');              //完善发票信息入库




        Route::any('/order_details', 'AdminController@OrderDetails');              //订单详情
        Route::any('/order_status_ajax', 'AdminController@OrderStatusAjax');       //ajax锁货
        Route::any('/order_pay_add', 'AdminController@OrderPayAdd');                //收款记录添加
        Route::get('/inquiry_list', 'AdminController@InquiryList');                 //询价单列表
        Route::get('/customize_list', 'AdminController@CustomizeList');             //定制单列表
        Route::get('/customize_status', 'AdminController@CustomizeStatus');         //查看定制单
        Route::post('/customize_update', 'AdminController@CustomizeUpdate');        //修改定制单
        /**
         *
         * 流水
         */
        Route::any('/order_pay_listing', 'AdminController@OrderPayListing');                //收款记录列表
        Route::any('/order_pay_details', 'AdminController@OrderPayDetails');                //收款记录明细
        /**
         * 资源单管理
         */
        Route::get('/manage_new_resource', 'AdminController@ManageNewResource');                                 //资源单管理
        Route::post('/new_resource_delete_action', 'AdminController@NewResourceDeleteAction');                   //资源单删除
        Route::any('/new_resource_examine', 'AdminController@NewResourceExamine');                               //资源单审核,
        Route::post('/new_resource_examine_action', 'AdminController@NewResourceExamineAction');                //修改审核状态
        Route::any('/new_resource_service_ajax', 'AdminController@NewResourceServiceAjax');                      //资源单ajax返回
        Route::any('/look_excel', 'AdminController@LookExcel');                                                  //预览资源单
        Route::any('/down_excel', 'AdminController@DownExcel');                                                  //下载资源单
       // Route::any('/add_excel', 'AdminController@AddExcel');


        /**
         *资讯管理
         */
        Route::get('/news_list', 'AdminController@NewsList');                              //资讯列表
        Route::get('/news_import', 'AdminController@NewsImport');                          //资讯导入
        Route::post('/news_delete_action', 'AdminController@NewsDeleteAction');            //资讯刪除
        Route::get('/news_service_ajax', 'AdminController@NewsServiceAjax');               //資訊ajax返回
        Route::post('/news_modify_action', 'AdminController@NewsModifyAction');            //資訊入库
        Route::post('/news_update_action', 'AdminController@NewsUpdateAction');            //資訊修改

        /**
         *商家管理
         */
        Route::get('/manage_supplier', 'AdminController@ManageSupplier');                   //商家列表
        Route::get('/add_supplier', 'AdminController@AddSupplier');                         //商家入驻
        Route::any('/edit_supplier', 'AdminController@EditSupplier');                       //编辑商家
        Route::any('/del_supplier', 'AdminController@DelSupplier');                         //删除商家
        Route::any('/supplier_ajax', 'AdminController@SupplierAjax');                       //ajax返回
        Route::any('/supplier_examine', 'AdminController@SupplierExamine');                 //商家审核
        Route::any('/supplier_examine_list', 'AdminController@SupplierExamineList');        //商家审核列表
        Route::any('/supplier_examine_action', 'AdminController@SupplierExamineAction');        //商家审核列表

        /**
         *会员管理
         */
        Route::get('/manage_customer', 'AdminController@ManageCustomer');                    //会员管理
        Route::get('/majia_list', 'AdminController@MajiaList');                              //马甲列表
        Route::get('/customer_import', 'AdminController@CustomerImport');                    //会员录入
        Route::any('/customer_edit', 'AdminController@CustomerEdit');                        //会员编辑
        Route::any('/customer_delete', 'AdminController@CustomerDelete');                    //会员删除
        Route::any('/customer_service_ajax', 'AdminController@CustomerServiceAjax');         //会员ajax返回

        Route::any('/select_user_mobile', 'AdminController@SelectUserMobile');               //会员电话查询
        /**
         * 产品管理
         */
        Route::get('/manage_product', 'AdminController@ManageProduct');                                 //产品管理
        Route::get('/product_import', 'AdminController@ProductImport');                                 //产品录入
        Route::post('/product_import_action', 'AdminController@ProductImportAction');                   //产品入库
        Route::post('/product_delete_action', 'AdminController@ProductDeleteAction');                   //产品删除
        Route::get('//product_examine_list', 'AdminController@ProductExamineList');                     //产品审核列表
        Route::get('/product_examine', 'AdminController@ProductExamine');                               //产品审核
        Route::post('/product_examine_action', 'AdminController@ProductExamineAction');                //修改审核状态
        Route::get('/product_service_ajax', 'AdminController@ProductServiceAjax');                      //产品ajax返回
        Route::any('/linkage', 'AdminController@linkage');                      //联动


        /**
         * 品名管理
         */
        Route::get('/product_brand', 'AdminController@ProductBrand');                                   //品名管理
        Route::get('/product_brand_import', 'AdminController@ProductBrandImport');                      //品名录入
        Route::post('/product_brand_import_action', 'AdminController@ProductBrandImportAction');        //品名入库
        Route::post('/product_brand_delete_action', 'AdminController@ProductBrandDeleteAction');        //品名删除
        Route::get('/product_brand_ajax', 'AdminController@ProductBrandAjax');                          //品名ajax返回
        Route::get('/product_brand_is', 'AdminController@ProductBrandIs');

        /**
         *
         * 品类录入
         */
        Route::any('/category_list', 'AdminController@CategoryList');                           //品类管理
        Route::any('/category_import', 'AdminController@CategoryImport');                      //品类录入
        Route::any('/category_import_action', 'AdminController@CategoryImportAction');       //品类入库
        Route::any('/product_category_delete_action', 'AdminController@ProductCategoryDeleteAction');//品类删除
        Route::get('/product_category_ajax', 'AdminController@ProductCategoryAjax');                          //品类ajax返回
        /**
         *
         * 规格录入
         */
        Route::any('/spec_list', 'AdminController@SpecList');                                            //规格管理
        Route::any('/spec_import', 'AdminController@SpecImport');                                      //规格录入
        Route::any('/spec_import_action', 'AdminController@SpecImportAction');                      //规格入库
        Route::any('/product_spec_delete_action', 'AdminController@ProductSpecDeleteAction');    //规格删除
        Route::get('/product_spec_ajax', 'AdminController@ProductSpecAjax');                       //规格ajax返回

        /**
         * 获取规格
         */

        Route::get('/get_spec', 'AdminController@GetSpec');                                              //
        
        /**
         * 材质管理
         */
        Route::get('/product_material', 'AdminController@ProductMaterial');                                   //材质管理
        Route::get('/product_material_import', 'AdminController@ProductMaterialImport');                      //材质录入
        Route::post('/product_material_import_action', 'AdminController@ProductMaterialImportAction');        //材质入库
        Route::post('/product_material_delete_action', 'AdminController@ProductMaterialDeleteAction');        //材质删除
        Route::get('/product_material_ajax', 'AdminController@ProductMaterialAjax');                          //材质ajax返回
        Route::get('/product_material_is', 'AdminController@ProductMaterialIs');                              //材质是否已存在

        /**
         * 分类管理
         */
        Route::get('/product_cate', 'AdminController@ProductCate');                                     //分类管理

        Route::get('/product_cate_import', 'AdminController@ProductCateImport');                        //分类录入
        Route::get('/product_class_import', 'AdminController@ProductClassImport');                      //品类录入
        Route::get('/product_quality_import', 'AdminController@ProductQualityImport');                  //材质录入
        Route::post('/product_cate_import_action', 'AdminController@ProductCateImportAction');    //分类，品类，材质入库
        Route::any('/product_cate_delete_action', 'AdminController@ProductCateDeleteAction');          //分类，品类，材质删除
        Route::post('/product_cate_update_action', 'AdminController@ProductCateUpdateAction');          //分类，品类，材质修改
        Route::get('/product_cate_ajax', 'AdminController@ProductCateAjax');                            //分类，品类，材质ajax返回
        Route::get('/product_level_import', 'AdminController@ProductLevelImport');                      //等级录入
        Route::post('/product_level_import_action', 'AdminController@ProductLevelImportAction');        //等级入库
        Route::get('/product_spec_import', 'AdminController@ProductSpecImport');                        //规格录入
        Route::post('/product_spec_import_action', 'AdminController@ProductSpecImportAction');          //规格入库

        //反馈意见
        Route::any('/opinion_list', 'AdminController@OpinionList');
        Route::any('/opinion_delete_action', 'AdminController@OpinionDeleteAction');  //删除反馈意见
        Route::any('/opinion_ajax', 'AdminController@OpinionAjax');                   //ajax返回值

        Route::any('/js_verify_register', 'AdminController@JsVerifyRegister');                  //js验证


        //仓储
        Route::any('/storage_service', 'AdminController@StorageService');//仓库列表
        Route::any('/storage_delete', 'AdminController@StorageDelete');//仓库删除
        Route::any('/storage_import', 'AdminController@StorageImport');//仓库添加
        Route::any('/storage_edit', 'AdminController@StorageEdit');//仓库添加,修改
        Route::any('/storage_service_ajax', 'AdminController@StorageServiceAjax');
        //钢厂
        Route::any('/factory_list', 'AdminController@FactoryList');//仓库列表
        Route::any('/factory_delete', 'AdminController@FactoryDelete');//仓库删除
        Route::any('/factory_import', 'AdminController@FactoryImport');//仓库添加
        Route::any('/factory_edit', 'AdminController@FactoryEdit');//仓库添加,修改
        Route::any('/factory_service_ajax', 'AdminController@FactoryServiceAjax');
        //系统通知
        Route::any('/message_list', 'AdminController@MessageList');//通知列表
        Route::any('/message_add', 'AdminController@MessageAdd');//通知添加
        Route::any('/message_add_action', 'AdminController@MessageAddAction');//通知入库
    });
});

/*------------------------------------------------PC商城---------------------------------------------------------*/
Route::get('/down', 'ShopController@Down');                                            //下载
Route::get('/', 'ShopController@Index');                                               //首页
Route::post('/shop_select', 'ShopController@ShopSelect');


Route::post('/publish_customize', 'ShopController@PublishCustomize');                   //发布定制单

Route::get('/login', 'ShopController@Login');                                          //登录
Route::any('/js_verify_login', 'ShopController@JsVerifyLogin');                        //js登录验证
Route::any('/verify_login', 'ShopController@VerifyLogin');                             //登录验证
Route::get('/logout', 'ShopController@Logout');                                         //退出登录

Route::get('/register', 'ShopController@Register');                                    //注册
Route::any('/js_verify_register', 'ShopController@JsVerifyRegister');                  //注册验证
Route::any('/verify_news', 'ShopController@VerifyNews');                               //注册短信验证
Route::any('/depose_register', 'ShopController@DeposeRegister');                       //注册入库


Route::get('/retrieve_pass', 'ShopController@RetrievePass');                           //重置密码
Route::any('/modify_pwd', 'ShopController@ModifyPwd');                           //密码入库

Route::any('/new_resource', 'ShopController@NewResource');                             //现货列表
Route::get('/new_resource_details', 'ShopController@NewResourceDetails');              //现货详情
Route::any('/ajax_new_resource', 'ShopController@AjaxNewResource');
Route::any('/down_excel', 'ShopController@DownExcel');                                                  //下载资源单
Route::any('/down_excel_all', 'ShopController@DownExcelAll');

Route::any('/look_excel', 'ShopController@LookExcel');


Route::get('/follow_add', 'ShopController@FollowAdd');
Route::get('/follow_delete', 'ShopController@FollowDelete');
Route::post('/down_new_resource', 'ShopUserController@DownNewResource');                         //现货下载次数
Route::get('/ajax_user_follow', 'ShopUserController@AjaxUserFollow');


Route::any('/shopping', 'ShopController@Shopping');                                    //商城列表
Route::any('/ajax_shopping', 'ShopController@AjaxShopping');                          //商城搜索AJAX
Route::any('/select_purchase', 'ShopController@SelectPurchase');                       //采购列表查询
Route::post('add_purchase', 'ShopController@AddPurchase');                             //发布采购
Route::get('/information_list', 'ShopController@InformationList');                     //资讯列表
Route::get('/information_details', 'ShopController@InformationDetails');             //资讯详情
Route::get('/mall_index', 'ShopController@MallIndex');                                 //商城页
Route::any('/jd_pay_first', 'ShopController@JdPayFirst');                               //pc端京东支付
Route::any('/jd_pay', 'ShopController@JdPay');                                           //pc端京东支付
Route::any('/jd_pay_success', 'ShopController@JdPaySuccess');                         //pc端京东支付成功
#异步通知
Route::get('/notify_web', 'ShopController@Notify');          //

#个人中心
Route::any('/user_account', 'ShopUserController@UserAccount');                                  //账户信息
Route::any('/user_account_modify', 'ShopUserController@UserAccountModify');                  //修改账户信息
Route::any('/avatar_update', 'ShopUserController@AvatarUpdate');                              //修改头像

Route::any('/ajax_place', 'ShopUserController@AjaxPlace');
Route::any('/user_now_resource', 'ShopUserController@UserNowResource');                         //发布现货资源
Route::any('/user_add_now_resource', 'ShopUserController@UserAddNowResource');                  //现货资源入库
Route::any('/add_excel', 'ShopUserController@AddExcel');
Route::any('/user_now_resource_admin', 'ShopUserController@UserNowResourceAdmin');              //资源单管理
Route::any('/new_resource_delete', 'ShopUserController@NowResourceDelete');                     //资源单删除
Route::any('/new_resource_ajax', 'ShopUserController@NowResourceAjax');                         //资源单删除

Route::any('/user_purchase_resource', 'ShopUserController@UserPurchaseResource');               //发布采购单
Route::any('/user_purchase_resource_admin', 'ShopUserController@UserPurchaseResourceAdmin');    //采购单管理
Route::any('/user_purchase_resource_del', 'ShopUserController@UserPurchaseResourceDel');        //采购单删除
Route::any('/user_purchase_resource_admin', 'ShopUserController@UserPurchaseResourceAdmin');    //采购单管理
Route::any('/user_receipt_address', 'ShopUserController@UserReceiptAddress');                   //收货地址

Route::any('/user_seller_join', 'ShopUserController@UserSellerJoin');                           //入驻钢链网
Route::any('/user_seller_join_info', 'ShopUserController@UserSellerJoinInfo');                  //入驻信息入库
Route::any('/user_seller_join_establishment', 'ShopUserController@UserSellerJoinEstablishment');
Route::any('/update_user_seller_join', 'ShopUserController@UpdateUserSellerJoin');              //重新审核


Route::any('/user_amend_pass', 'ShopUserController@UserAmend_pass');                            //修改密码
Route::any('/user_password_select', 'ShopUserController@UserPasswordSelect');                   //查询原密码是否正确
Route::any('/user_password_update', 'ShopUserController@UserPasswordUpdate');                   //修改原密码
Route::any('/user_person', 'ShopUserController@UserPerson');                                      //个人主页

#--------------------------购物车-------------------

Route::get('/shop_add_cart', 'ShopUserController@ShopAddCart');                                //添加购物车
Route::any('/shop_cart_list', 'ShopUserController@ShopCartList');                               //购物车列表
Route::any('/shop_cart_delete', 'ShopUserController@ShopCartDelete');                           //删除购物车商品
Route::any('/head_cart_delete', 'ShopUserController@HeadCartDelete');                           //删除购物车商品
Route::post('/shop_update_cart', 'ShopUserController@ShopUpdateCart');                          //购物车更新商品
Route::any('/shop_cart_ajax', 'ShopUserController@ShopCartAjax');                               //购物车商品AJAX返回值
Route::any('/shop_cart_submit', 'ShopUserController@ShopCartSubmit');                           //提交购物车商品
Route::any('/shop_generate_order', 'ShopUserController@ShopGenerateOrder');                     //生成订单

//----------------------------订单------------------------------


Route::any('/user_order', 'ShopUserController@UserOrder');                        //我的订单
Route::any('/user_order_num', 'ShopUserController@UserOrderNum');                 //我的订单数量
Route::any('/cancel_order_no_pay', 'ShopUserController@CancelOrderNoPay');               //订单取消(未支付)
Route::any('/cancel_order_no_lock', 'ShopUserController@CancelOrderNoLock');               //订单取消(未审核)
Route::any('/del_order_pc', 'ShopUserController@DelOrderPc');                     //订单删除
Route::any('/confirm_receipt', 'ShopUserController@ConfirmReceipt');              //确认收货
Route::any('/order_details', 'ShopUserController@OrderDetailPc');                 //订单详情
Route::any('/default_address', 'ShopUserController@DefaultAddress');              //设为默认地址
Route::any('/delete_address', 'ShopUserController@DeleteAddress');                //删除地址
Route::any('/update_select', 'ShopUserController@UpdateSelect');                  //修改查询
Route::any('/insert_address', 'ShopUserController@InsertAddress');                //添加地址
Route::any('/update_address', 'ShopUserController@UpdateAddress');                //修改地址


Route::any('/purchase_guarantee', 'ShopController@PurchaseGuarantee');                //修改地址

Route::any('/add_invoice', 'ShopUserController@AddInvoice');                     //开发票
Route::any('/select_invoice', 'ShopUserController@SelectInvoice');             //查询发票
Route::any('/select_invoice_ajax', 'ShopUserController@SelectInvoiceAjax');  //查询发票Ajax
#帮助中心
Route::any('/foot_about', 'ShopController@FootAbout');                     //关于我们
Route::any('/foot_dl', 'ShopController@FootDl');                           //常见问题
Route::any('/foot_contact_us', 'ShopController@FootContactUs');                        //关于我们
Route::any('/foot_lav', 'ShopController@FootLav');

Route::post('/opinion', 'ShopController@Opinion');                           //反馈意见
Route::any('/banner_special', 'ShopController@BannerSpecial');                           //反馈意见



Route::any('/phone', 'ShopController@Phone');                           //移动端
Route::any('/shop_user_news', 'ShopUserController@ShopUserNews');                           //消息中心
